﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtlasLogInfo
{
    //class AtlasActivities
    //{
    //int moveManyCounter = 0;
    //TimeSpan timeForMoveMany = new TimeSpan();
    //DateTime moveManyStart = new DateTime();
    //timeForMoveMany = TimeSpan.MinValue;
    //        TimeSpan sumTimeForMoveMany = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //int splitLinkCounter = 0;
    //TimeSpan timeForSplitLink = new TimeSpan();
    //DateTime splitLinkStart = new DateTime();
    //timeForSplitLink = TimeSpan.MinValue;
    //        TimeSpan sumTimeForSplitLink = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //int addShapeCounter = 0;
    //TimeSpan timeForAddShape = new TimeSpan();
    //DateTime addShapeStart = new DateTime();
    //timeForAddShape = TimeSpan.MinValue;
    //        TimeSpan sumTimeForAddShape = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //int delShapeCounter = 0;
    //TimeSpan timeForDelShape = new TimeSpan();
    //DateTime delShapeStart = new DateTime();
    //timeForAddShape = TimeSpan.MinValue;
    //        TimeSpan sumTimeForDelShape = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //int addLinkChainCounter = 0;
    //TimeSpan timeForAddLinkChain = new TimeSpan();
    //DateTime addLinkChainStart = new DateTime();
    //timeForAddLinkChain = TimeSpan.MinValue;
    //        TimeSpan sumTimeForAddLinkChain = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //int deleteNodeCounter = 0;
    //TimeSpan timeForDeleteNode = new TimeSpan();
    //DateTime deleteNodeStart = new DateTime();
    //timeForDeleteNode = TimeSpan.MinValue;
    //        TimeSpan sumTimeForDeleteNode = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //int navLinkEditCounter = 0;
    //TimeSpan timeForNavLinkEdit = new TimeSpan();
    //DateTime navLinkEditStart = new DateTime();
    //timeForNavLinkEdit = TimeSpan.MinValue;
    //        TimeSpan sumTimeForNavLinkEdit = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    //int poiAddCounter = 0;
    //TimeSpan timeForPoiAdd = new TimeSpan();
    //DateTime poiAddStart = new DateTime();
    //timeForPoiAdd = TimeSpan.MinValue;
    //        TimeSpan sumTimeForPoiAdd = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //int poiEditCounter = 0;
    //TimeSpan timeForPoiEdit = new TimeSpan();
    //DateTime poiEditStart = new DateTime();
    //timeForPoiEdit = TimeSpan.MinValue;
    //        TimeSpan sumTimeForPoiEdit = new TimeSpan();
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////








    //                                else if (currentMessageCell == "Move Many task starting")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            moveManyStart = timestamp;
    //                            currentOperation = CurrentOperation.MoveMany;
    //                        }
    //                        else if (currentMessageCell == "Move Many task completed by user.")
    //                        {
    //                            if (currentOperation == CurrentOperation.MoveMany)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForMoveMany = (timestamp - moveManyStart);
    //                                if (timeForMoveMany<twoMinutes)
    //                                    sumTimeForMoveMany += timeForMoveMany;
    //                                else sumTimeForMoveMany += tenSeconds;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                moveManyCounter++;
    //                            }

    //                        }
    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                        else if (currentMessageCell == "Split Link task starting, choose split point(s).")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            splitLinkStart = timestamp;
    //                            currentOperation = CurrentOperation.LinkSplit;

    //                        }
    //                        else if (currentMessageCell == "Split Link task completed.")
    //                        {
    //                            if (currentOperation == CurrentOperation.LinkSplit)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForSplitLink = (timestamp - splitLinkStart);
    //                                if (timeForSplitLink<twoMinutes)
    //                                    sumTimeForSplitLink += timeForSplitLink;
    //                                else sumTimeForSplitLink += tenSeconds;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                splitLinkCounter++;
    //                            }
    //                        }
    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                        else if (currentMessageCell == "Add Shape task starting")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            addShapeStart = timestamp;
    //                            currentOperation = CurrentOperation.AddShape;
    //                        }
    //                        else if (currentMessageCell == "Add Shape task completed by user.")
    //                        {
    //                            if (currentOperation == CurrentOperation.AddShape)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForAddShape = (timestamp - addShapeStart);
    //                                if (timeForAddShape<twoMinutes)
    //                                    sumTimeForAddShape += timeForAddShape;
    //                                else sumTimeForAddShape += tenSeconds;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                addShapeCounter++;
    //                            }
    //                        }
    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                        else if (currentMessageCell == "Add Link Chain task starting.")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            addLinkChainStart = timestamp;
    //                            currentOperation = CurrentOperation.AddLinkChain;
    //                        }
    //                        else if (currentMessageCell == "Add Link Chain task completed.")
    //                        {
    //                            if (currentOperation==CurrentOperation.AddLinkChain)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForAddLinkChain = (timestamp - addLinkChainStart);
    //                                if (timeForAddLinkChain<twoMinutes)
    //                                    sumTimeForAddLinkChain += timeForAddLinkChain;
    //                                else sumTimeForAddLinkChain += tenSeconds;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                addLinkChainCounter++;
    //                            }
    //                        }
    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                        else if (currentMessageCell == "Delete Node(s) task starting")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            deleteNodeStart = timestamp;
    //                            currentOperation = CurrentOperation.DeleteNode;
    //                        }
    //                        else if (currentMessageCell == "Delete Node(s) task completed.")
    //                        {
    //                            if (currentOperation==CurrentOperation.DeleteNode)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForDeleteNode = (timestamp - deleteNodeStart);
    //                                if (timeForDeleteNode<minute)
    //                                    sumTimeForDeleteNode += timeForDeleteNode;
    //                                else sumTimeForDeleteNode += tenSeconds;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                deleteNodeCounter++;
    //                            }
    //                        }
    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                        else if (currentMessageCell == "NavLink Edit task starting")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            navLinkEditStart = timestamp;
    //                            currentOperation = CurrentOperation.NavLinkEdit;
    //                        }
    //                        else if (currentMessageCell == "Attributes modified")
    //                        {
    //                            if (currentOperation==CurrentOperation.NavLinkEdit)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForNavLinkEdit = (timestamp - navLinkEditStart);
    //                                if (timeForNavLinkEdit<minute)
    //                                    sumTimeForNavLinkEdit += timeForNavLinkEdit;
    //                                else sumTimeForNavLinkEdit += tenSeconds;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                navLinkEditCounter++;
    //                            }
    //                        }
    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                        else if (currentMessageCell == "Del Shape task starting")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            delShapeStart = timestamp;
    //                            currentOperation = CurrentOperation.DelShape;
    //                        }
    //                        else if (currentMessageCell == "Del Shape task completed.")
    //                        {
    //                            if (currentOperation==CurrentOperation.DelShape)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForDelShape = (timestamp - delShapeStart);
    //                                if (timeForDelShape<twoMinutes)
    //                                    sumTimeForDelShape += timeForDelShape;
    //                                else sumTimeForDelShape += tenSeconds;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                delShapeCounter++;
    //                            }
    //                        }
    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                        else if (currentMessageCell == "POI Add task starting")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            poiAddStart = timestamp;
    //                            currentOperation = CurrentOperation.PoiAdd;
    //                        }
    //                        else if (currentMessageCell == "POI Add task completed ")
    //                        {
    //                            if (currentOperation == CurrentOperation.PoiAdd)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForPoiAdd = (timestamp - poiAddStart);
    //                                if (timeForPoiAdd<threeMinutes)
    //                                    sumTimeForPoiAdd += timeForPoiAdd;
    //                                else sumTimeForPoiAdd += minute;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                poiAddCounter++;

    //                            }
    //                        }
    //                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                        else if (currentMessageCell == "POI Edit task starting")
    //                        {
    //                            timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                            poiEditStart = timestamp;
    //                            currentOperation = CurrentOperation.PoiEdit;
    //                        }
    //                        else if (currentMessageCell == "POI Edit task completed ")
    //                        {
    //                            if (currentOperation == CurrentOperation.PoiEdit)
    //                            {
    //                                timestamp = Convert.ToDateTime(WorkSheet.Cells[i, "A"].Value);
    //                                timeForPoiEdit = (timestamp - poiEditStart);
    //                                if (timeForPoiEdit<threeMinutes)
    //                                    sumTimeForPoiEdit += timeForPoiEdit;
    //                                else sumTimeForPoiEdit += minute;
    //                                currentOperation = CurrentOperation.NoOperation;
    //                                poiEditCounter++;
    //                            }
    //                        }




    //Console.WriteLine("{0} {1} \t Move Many", sumTimeForMoveMany, moveManyCounter);
    //Console.WriteLine("{0} {1} \t Split Link", sumTimeForSplitLink, splitLinkCounter);
    //Console.WriteLine("{0} {1} \t Add Shape", sumTimeForAddShape, addShapeCounter);
    //Console.WriteLine("{0} {1} \t Add Link", sumTimeForAddLinkChain, addLinkChainCounter);
    //Console.WriteLine("{0} {1} \t Delete Node", sumTimeForDeleteNode, deleteNodeCounter);
    //Console.WriteLine("{0} {1} \t NavLink Edit", sumTimeForNavLinkEdit, navLinkEditCounter);
    //Console.WriteLine("{0} {1} \t POI Add", sumTimeForPoiAdd, poiAddCounter);
    //Console.WriteLine("{0} {1} \t POI Edit", sumTimeForPoiEdit, poiEditCounter);

    //}
}
